package com.android.qjpmc.data_module;

public class CUserModule {
    CUser m_current_user = new CUser();
    public int UserLogin(String user_name, String user_key)
    {
        if (m_current_user == null)
        {
            return 1;
        }
        if (m_current_user.IsUserKeyRight(user_name, user_key) > 0)
        {
            ;
        }
        m_current_user.m_user_name = user_name;
        m_current_user.m_user_key = user_key;
        return 0;
    }
    public CUser GetCurrentUser()
    {
        return m_current_user;
    }
    public String GetCurrentUserName()
    {
        CUser CurrentUser = GetCurrentUser();
        if (CurrentUser == null)
        {
            return null;
        }
        return CurrentUser.m_user_name;
    }
    public int SetCurrentUserName(String name)
    {
        CUser CurrentUser = GetCurrentUser();
        if (CurrentUser == null)
        {
            return 1;
        }
        CurrentUser.m_user_name = name;
        return 0;
    }
}
